package com.zhou.syt.hosp.service.impl;

import com.atguigu.yygh.model.hosp.HospitalSet;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhou.syt.common.exception.YyghException;
import com.zhou.syt.common.result.ResultCodeEnum;
import com.zhou.syt.hosp.mapper.HospitalSetMapper;
import com.zhou.syt.hosp.service.HospitalSetService;
import com.zhou.syt.util.MD5;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;

import javax.annotation.Resource;

/**
 * @ClassName: HospitalSetServiceImpl
 * @Description:
 * @Author: admin
 * @Date: 2021/12/11 13:21
 */

@Service
public class HospitalSetServiceImpl extends ServiceImpl<HospitalSetMapper, HospitalSet> implements HospitalSetService {

    @Override
    public String getKey(String hospCode) {
        QueryWrapper<HospitalSet> hospitalSetQueryWrapper = new QueryWrapper<>();
        hospitalSetQueryWrapper.eq("hoscode",hospCode);
        HospitalSet hospitalSet = baseMapper.selectOne(hospitalSetQueryWrapper);

        return hospitalSet.getSignKey();
    }
}
